{
 "cells": [
  {
   "cell_type": "raw",
   "id": "87ca1056-b3a6-447e-bafb-77ec391b3ed2",
   "metadata": {},
   "source": [
    "../../datasets/fogged/fogged_strengthx.x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "add0a04e-a378-4097-83fd-982ff2c07c51",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import cv2\n",
    "from for_different_strength import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "0e8b091a-4d8a-48cb-ba26-74d39197c505",
   "metadata": {},
   "outputs": [],
   "source": [
    "test_strength = 0.9\n",
    "model_name = 'base_s_16e'\n",
    "model = f'../{model_name}.pt'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "cc8f9519-59fd-429c-8124-3e5c8d94bedd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set updated successfully!\n"
     ]
    }
   ],
   "source": [
    "update_testsets = f\" \\\n",
    "rm ../../datasets/kitti/images/test/* &&\\\n",
    "cp ../../datasets/fogged/fogged_strength{test_strength}/* ../../datasets/kitti/images/test/ && \\\n",
    "echo 'Test set updated successfully!' \\\n",
    "\" \n",
    "!{update_testsets}\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "cdcd1e3d-5473-49de-8d55-f0e214bc8daf",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[34m\u001b[1mval: \u001b[0mdata=../data/kitti.yaml, weights=['../base_s_16e.pt'], batch_size=32, imgsz=640, conf_thres=0.001, iou_thres=0.6, max_det=300, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=../runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
      "YOLOv5 🚀 2bde9db5 Python-3.10.8 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3080, 20181MiB)\n",
      "\n",
      "Fusing layers... \n",
      "YOLOv5s_kitti summary: 157 layers, 7031701 parameters, 0 gradients, 15.8 GFLOPs\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mScanning /root/autodl-tmp/datasets/kitti/labels/test... 2244 images, 0 bac\u001b[0m\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mNew cache created: /root/autodl-tmp/datasets/kitti/labels/test.cache\n",
      "                 Class     Images  Instances          P          R      mAP50   \n",
      "                   all       2244      12198      0.626      0.227      0.247      0.145\n",
      "                   Car       2244       8711      0.755      0.496       0.59      0.355\n",
      "                   Van       2244        861      0.498      0.317      0.316      0.207\n",
      "                 Truck       2244        333      0.824     0.0562      0.117     0.0695\n",
      "                  Tram       2244        138      0.746     0.0652     0.0708     0.0371\n",
      "            Pedestrian       2244       1286      0.745      0.343      0.411      0.223\n",
      "        Person_sitting       2244         89      0.503      0.124      0.115     0.0602\n",
      "               Cyclist       2244        496      0.744      0.204      0.231      0.142\n",
      "                  Misc       2244        284      0.196      0.215      0.124     0.0641\n",
      "Speed: 0.0ms pre-process, 1.1ms inference, 0.9ms NMS per image at shape (32, 3, 640, 640)\n",
      "Results saved to \u001b[1m../runs/val/exp3\u001b[0m\n",
      "Test set val successfully!\n"
     ]
    }
   ],
   "source": [
    "val_command = f\" \\\n",
    "python ../val.py \\\n",
    "--data ../data/kitti.yaml \\\n",
    "--weights {model} \\\n",
    "--task test &&\\\n",
    "echo 'Test set val successfully!' \\\n",
    "\" \n",
    "!{val_command}\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e1e2e3f4-eb2a-4b0a-a7d1-e744685ed142",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6b6ef062-9fba-459c-a7a5-764e4ebe8d8b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e91044ec-15c1-40cb-82ac-9b0ed48b974c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set updated successfully!\n",
      "\u001b[34m\u001b[1mval: \u001b[0mdata=../data/kitti.yaml, weights=['../base_s_16e.pt'], batch_size=32, imgsz=640, conf_thres=0.001, iou_thres=0.6, max_det=300, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=../runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
      "YOLOv5 🚀 2bde9db5 Python-3.10.8 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3080, 20181MiB)\n",
      "\n",
      "Fusing layers... \n",
      "YOLOv5s_kitti summary: 157 layers, 7031701 parameters, 0 gradients, 15.8 GFLOPs\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mScanning /root/autodl-tmp/datasets/kitti/labels/test... 2244 images, 0 bac\u001b[0m\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mNew cache created: /root/autodl-tmp/datasets/kitti/labels/test.cache\n",
      "                 Class     Images  Instances          P          R      mAP50   \n",
      "                   all       2244      12198      0.841      0.706      0.789      0.492\n",
      "                   Car       2244       8711       0.91      0.854      0.934      0.669\n",
      "                   Van       2244        861       0.82      0.731       0.83      0.571\n",
      "                 Truck       2244        333       0.94      0.844      0.911      0.659\n",
      "                  Tram       2244        138      0.789      0.892      0.909      0.553\n",
      "            Pedestrian       2244       1286       0.84       0.63      0.732      0.376\n",
      "        Person_sitting       2244         89      0.741      0.449      0.533       0.27\n",
      "               Cyclist       2244        496      0.891      0.659      0.775      0.418\n",
      "                  Misc       2244        284      0.797      0.592      0.689       0.42\n",
      "Speed: 0.1ms pre-process, 1.1ms inference, 1.0ms NMS per image at shape (32, 3, 640, 640)\n",
      "Results saved to \u001b[1m../runs/val/exp4\u001b[0m\n",
      "Test set val successfully!\n"
     ]
    }
   ],
   "source": [
    "test_strength = 0.1\n",
    "model_name = 'base_s_16e'\n",
    "model = f'../{model_name}.pt'\n",
    "\n",
    "update_testsets = f\" \\\n",
    "rm ../../datasets/kitti/images/test/* &&\\\n",
    "cp ../../datasets/fogged/fogged_strength{test_strength}/* ../../datasets/kitti/images/test/ && \\\n",
    "echo 'Test set updated successfully!' \\\n",
    "\" \n",
    "!{update_testsets}\n",
    "\n",
    "val_command = f\" \\\n",
    "python ../val.py \\\n",
    "--data ../data/kitti.yaml \\\n",
    "--weights {model} \\\n",
    "--task test &&\\\n",
    "echo 'Test set val successfully!' \\\n",
    "\" \n",
    "!{val_command}\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c1b8b35b-b390-47b3-98e4-1dba713dd835",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "dc18ad15-1248-49dd-afe0-8db36d71eaf2",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d17aaa41-021a-478e-8eb0-e0c33005b807",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "35504908-f3fc-447d-aff2-fc12c8dd3a8d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set updated successfully!\n",
      "\u001b[34m\u001b[1mval: \u001b[0mdata=../data/kitti.yaml, weights=['../base_s_16e.pt'], batch_size=32, imgsz=640, conf_thres=0.001, iou_thres=0.6, max_det=300, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=../runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
      "YOLOv5 🚀 2bde9db5 Python-3.10.8 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3080, 20181MiB)\n",
      "\n",
      "Fusing layers... \n",
      "YOLOv5s_kitti summary: 157 layers, 7031701 parameters, 0 gradients, 15.8 GFLOPs\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mScanning /root/autodl-tmp/datasets/kitti/labels/test... 2244 images, 0 bac\u001b[0m\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mNew cache created: /root/autodl-tmp/datasets/kitti/labels/test.cache\n",
      "                 Class     Images  Instances          P          R      mAP50   \n",
      "                   all       2244      12198      0.575      0.178      0.192      0.114\n",
      "                   Car       2244       8711      0.746       0.39      0.486      0.292\n",
      "                   Van       2244        861      0.479      0.247      0.238      0.158\n",
      "                 Truck       2244        333       0.81     0.0385     0.0688     0.0365\n",
      "                  Tram       2244        138      0.537     0.0362     0.0414     0.0239\n",
      "            Pedestrian       2244       1286      0.752      0.295      0.349      0.196\n",
      "        Person_sitting       2244         89      0.445      0.101     0.0963     0.0455\n",
      "               Cyclist       2244        496      0.692      0.173      0.186      0.117\n",
      "                  Misc       2244        284       0.14      0.144     0.0737     0.0382\n",
      "Speed: 0.1ms pre-process, 1.0ms inference, 0.9ms NMS per image at shape (32, 3, 640, 640)\n",
      "Results saved to \u001b[1m../runs/val/exp5\u001b[0m\n",
      "Test set val successfully!\n"
     ]
    }
   ],
   "source": [
    "test_strength = 0.3\n",
    "model_name = 'base_s_16e'\n",
    "model = f'../{model_name}.pt'\n",
    "\n",
    "update_testsets = f\" \\\n",
    "rm ../../datasets/kitti/images/test/* &&\\\n",
    "cp ../../datasets/fogged/fogged_strength{test_strength}/* ../../datasets/kitti/images/test/ && \\\n",
    "echo 'Test set updated successfully!' \\\n",
    "\" \n",
    "!{update_testsets}\n",
    "\n",
    "val_command = f\" \\\n",
    "python ../val.py \\\n",
    "--data ../data/kitti.yaml \\\n",
    "--weights {model} \\\n",
    "--task test &&\\\n",
    "echo 'Test set val successfully!' \\\n",
    "\" \n",
    "!{val_command}\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8ef82b4b-1b48-4294-9c69-575dd70c3792",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "25c40814-0a45-4b36-84fa-1eab0c506b8b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e909c1dc-bea7-491a-819b-536dd1b5c772",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "427a824f-424a-49b8-8e25-607e28f7f9b6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set updated successfully!\n",
      "\u001b[34m\u001b[1mval: \u001b[0mdata=../data/kitti.yaml, weights=['../base_s_16e.pt'], batch_size=32, imgsz=640, conf_thres=0.001, iou_thres=0.6, max_det=300, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=../runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
      "YOLOv5 🚀 2bde9db5 Python-3.10.8 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3080, 20181MiB)\n",
      "\n",
      "Fusing layers... \n",
      "YOLOv5s_kitti summary: 157 layers, 7031701 parameters, 0 gradients, 15.8 GFLOPs\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mScanning /root/autodl-tmp/datasets/kitti/labels/test... 2244 images, 0 bac\u001b[0m\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mNew cache created: /root/autodl-tmp/datasets/kitti/labels/test.cache\n",
      "                 Class     Images  Instances          P          R      mAP50   \n",
      "                   all       2244      12198      0.619       0.42      0.465      0.273\n",
      "                   Car       2244       8711      0.785      0.705      0.788      0.501\n",
      "                   Van       2244        861      0.507      0.548      0.546      0.355\n",
      "                 Truck       2244        333      0.918      0.335      0.573      0.365\n",
      "                  Tram       2244        138      0.311      0.362      0.291      0.144\n",
      "            Pedestrian       2244       1286      0.731       0.47      0.551      0.286\n",
      "        Person_sitting       2244         89      0.547      0.202      0.197      0.106\n",
      "               Cyclist       2244        496      0.806      0.378      0.462      0.246\n",
      "                  Misc       2244        284      0.346      0.356      0.313       0.18\n",
      "Speed: 0.1ms pre-process, 1.1ms inference, 0.8ms NMS per image at shape (32, 3, 640, 640)\n",
      "Results saved to \u001b[1m../runs/val/exp6\u001b[0m\n",
      "Test set val successfully!\n"
     ]
    }
   ],
   "source": [
    "test_strength = 0.6\n",
    "model_name = 'base_s_16e'\n",
    "model = f'../{model_name}.pt'\n",
    "\n",
    "update_testsets = f\" \\\n",
    "rm ../../datasets/kitti/images/test/* &&\\\n",
    "cp ../../datasets/fogged/fogged_strength{test_strength}/* ../../datasets/kitti/images/test/ && \\\n",
    "echo 'Test set updated successfully!' \\\n",
    "\" \n",
    "!{update_testsets}\n",
    "\n",
    "val_command = f\" \\\n",
    "python ../val.py \\\n",
    "--data ../data/kitti.yaml \\\n",
    "--weights {model} \\\n",
    "--task test &&\\\n",
    "echo 'Test set val successfully!' \\\n",
    "\" \n",
    "!{val_command}\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fedd2389-17ba-4b3a-a2d5-6bf3dd5aa49a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5596a94d-fa3f-447f-b100-ff1edab1fefd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ff484844-78a9-44e1-bbf9-c66cae1423e6",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "7a9c6868-4723-43bd-acc0-1c0ff7110e7b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set updated successfully!\n",
      "\u001b[34m\u001b[1mval: \u001b[0mdata=../data/kitti.yaml, weights=['../base_s_16e.pt'], batch_size=32, imgsz=640, conf_thres=0.001, iou_thres=0.6, max_det=300, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=../runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
      "YOLOv5 🚀 2bde9db5 Python-3.10.8 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3080, 20181MiB)\n",
      "\n",
      "Fusing layers... \n",
      "YOLOv5s_kitti summary: 157 layers, 7031701 parameters, 0 gradients, 15.8 GFLOPs\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mScanning /root/autodl-tmp/datasets/kitti/labels/test.cache... 2244 images,\u001b[0m\n",
      "                 Class     Images  Instances          P          R      mAP50   \n",
      "                   all       2244      12198      0.558     0.0904      0.107     0.0698\n",
      "                   Car       2244       8711       0.88      0.135      0.237      0.173\n",
      "                   Van       2244        861      0.403     0.0976      0.088     0.0636\n",
      "                 Truck       2244        333          1     0.0116     0.0274     0.0195\n",
      "                  Tram       2244        138      0.214     0.0145      0.017     0.0115\n",
      "            Pedestrian       2244       1286      0.809      0.186      0.248      0.143\n",
      "        Person_sitting       2244         89      0.426      0.101     0.0846     0.0434\n",
      "               Cyclist       2244        496      0.614      0.105      0.117     0.0773\n",
      "                  Misc       2244        284      0.122     0.0724     0.0395     0.0268\n",
      "Speed: 0.1ms pre-process, 1.1ms inference, 0.6ms NMS per image at shape (32, 3, 640, 640)\n",
      "Results saved to \u001b[1m../runs/val/exp8\u001b[0m\n",
      "Test set val successfully!\n"
     ]
    }
   ],
   "source": [
    "test_strength = 1.2\n",
    "model_name = 'base_s_16e'\n",
    "model = f'../{model_name}.pt'\n",
    "\n",
    "update_testsets = f\" \\\n",
    "rm ../../datasets/kitti/images/test/* &&\\\n",
    "cp ../../datasets/fogged/fogged_strength{test_strength}/* ../../datasets/kitti/images/test/ && \\\n",
    "echo 'Test set updated successfully!' \\\n",
    "\" \n",
    "!{update_testsets}\n",
    "\n",
    "val_command = f\" \\\n",
    "python ../val.py \\\n",
    "--data ../data/kitti.yaml \\\n",
    "--weights {model} \\\n",
    "--task test &&\\\n",
    "echo 'Test set val successfully!' \\\n",
    "\" \n",
    "!{val_command}\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d31a0c69-fe82-44a6-a83a-a009ba01de2f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8a93cd53-b153-472d-8b36-378454793498",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4ed53e5a-5526-4e13-bd34-0059222efd65",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "21b9caf0-a1d7-4d91-a968-0666dcb72a8a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set updated successfully!\n",
      "\u001b[34m\u001b[1mval: \u001b[0mdata=../data/kitti.yaml, weights=['../base_s_16e.pt'], batch_size=32, imgsz=640, conf_thres=0.001, iou_thres=0.6, max_det=300, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=../runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
      "YOLOv5 🚀 2bde9db5 Python-3.10.8 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3080, 20181MiB)\n",
      "\n",
      "Fusing layers... \n",
      "YOLOv5s_kitti summary: 157 layers, 7031701 parameters, 0 gradients, 15.8 GFLOPs\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mScanning /root/autodl-tmp/datasets/kitti/labels/test... 2244 images, 0 bac\u001b[0m\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mNew cache created: /root/autodl-tmp/datasets/kitti/labels/test.cache\n",
      "                 Class     Images  Instances          P          R      mAP50   \n",
      "                   all       2244      12198      0.526     0.0501     0.0763     0.0505\n",
      "                   Car       2244       8711      0.903     0.0798        0.2      0.151\n",
      "                   Van       2244        861      0.297     0.0488     0.0553     0.0376\n",
      "                 Truck       2244        333      0.634    0.00541     0.0112    0.00724\n",
      "                  Tram       2244        138      0.299     0.0145     0.0169     0.0122\n",
      "            Pedestrian       2244       1286      0.819      0.108      0.176     0.0998\n",
      "        Person_sitting       2244         89      0.503     0.0337     0.0431     0.0241\n",
      "               Cyclist       2244        496      0.646     0.0661     0.0809     0.0524\n",
      "                  Misc       2244        284      0.107     0.0444     0.0268     0.0196\n",
      "Speed: 0.1ms pre-process, 1.0ms inference, 0.6ms NMS per image at shape (32, 3, 640, 640)\n",
      "Results saved to \u001b[1m../runs/val/exp9\u001b[0m\n",
      "Test set val successfully!\n"
     ]
    }
   ],
   "source": [
    "test_strength = 1.5\n",
    "model_name = 'base_s_16e'\n",
    "model = f'../{model_name}.pt'\n",
    "\n",
    "update_testsets = f\" \\\n",
    "rm ../../datasets/kitti/images/test/* &&\\\n",
    "cp ../../datasets/fogged/fogged_strength{test_strength}/* ../../datasets/kitti/images/test/ && \\\n",
    "echo 'Test set updated successfully!' \\\n",
    "\" \n",
    "!{update_testsets}\n",
    "\n",
    "val_command = f\" \\\n",
    "python ../val.py \\\n",
    "--data ../data/kitti.yaml \\\n",
    "--weights {model} \\\n",
    "--task test &&\\\n",
    "echo 'Test set val successfully!' \\\n",
    "\" \n",
    "!{val_command}\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d2cdff58-fd03-4983-8952-072ae0726cd0",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bcb8e10e-b2d8-4490-b369-fc7104508c40",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fca6752e-0e87-4a34-823d-a1640d806e2c",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "67662a3f-a08e-4d1b-b059-334a25953f1b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e06dfb3a-6990-47d6-a9b6-7c86818f51eb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set updated successfully!\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[34m\u001b[1mval: \u001b[0mdata=../data/kitti.yaml, weights=['../base_s_16e.pt'], batch_size=32, imgsz=640, conf_thres=0.001, iou_thres=0.6, max_det=300, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=../runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
      "YOLOv5 🚀 5acf9a1c Python-3.10.8 torch-2.1.2+cu118 CUDA:0 (NVIDIA GeForce RTX 3080, 20181MiB)\n",
      "\n",
      "Fusing layers... \n",
      "YOLOv5s_kitti summary: 157 layers, 7031701 parameters, 0 gradients, 15.8 GFLOPs\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mScanning /root/autodl-tmp/datasets/kitti/labels/test... 2244 images, 0 backgrounds, 0 corrupt: 100%|██████████| 2244/2244 [00:00<00:00, 6028.59it/s]\n",
      "\u001b[34m\u001b[1mtest: \u001b[0mNew cache created: /root/autodl-tmp/datasets/kitti/labels/test.cache\n",
      "                 Class     Images  Instances          P          R      mAP50   mAP50-95: 100%|██████████| 71/71 [00:11<00:00,  6.00it/s]\n",
      "                   all       2244      12198      0.575      0.178      0.192      0.114\n",
      "                   Car       2244       8711      0.746       0.39      0.486      0.292\n",
      "                   Van       2244        861      0.479      0.247      0.238      0.158\n",
      "                 Truck       2244        333       0.81     0.0385     0.0688     0.0365\n",
      "                  Tram       2244        138      0.537     0.0362     0.0414     0.0239\n",
      "            Pedestrian       2244       1286      0.752      0.295      0.349      0.196\n",
      "        Person_sitting       2244         89      0.445      0.101     0.0963     0.0455\n",
      "               Cyclist       2244        496      0.692      0.173      0.186      0.117\n",
      "                  Misc       2244        284       0.14      0.144     0.0737     0.0382\n",
      "Speed: 0.1ms pre-process, 1.1ms inference, 0.8ms NMS per image at shape (32, 3, 640, 640)\n",
      "Results saved to \u001b[1m../runs/val/exp10\u001b[0m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test set val successfully!\n"
     ]
    }
   ],
   "source": [
    "run_fog_test(test_strength = 0.3, model_name = 'base_s_16e')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "dd2fa9e1-646e-4c10-906a-0a3f630cea4c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
